#!/usr/bin/env python
# encoding: utf-8
# @author: liusir
# @file: demo_08.py
# @time: 2022/11/16 8:25 PM

import unittest
import paramunittest
# 传入元组
@paramunittest.parametrized(
    (50,20,70),(30,40,70),(100,20,120)
)
class TestDemo(paramunittest.ParametrizedTestCase):
    def setParameters(self,numa,numb,numc):
        self.a = numa
        self.b = numb
        self.c = numc
    def test_add_case(self):
        print( "%d + %d ?= %d"%(self.a,self.b,self.c) )
        self.assertEqual( self.a+self.b , self.c )
if __name__=="__main__":
    unittest.main()
